//
//  SectionView.m
//  HappyTrip
//
//  Created by yuxuesong on 15-3-25.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SectionView.h"

@implementation SectionView

- (void)dealloc
{
    [_headerLable release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.headerLable = [[UILabel alloc] init];
        [self addSubview:self.headerLable];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat width = self.bounds.size.width;
    CGFloat height = self.bounds.size.height;
    self.headerLable.frame = CGRectMake(15, 2, width - 15 * 2, height - 2);
    self.headerLable.clipsToBounds = YES;
    self.headerLable.backgroundColor = [UIColor colorWithRed:0 / 255.0 green:170.0 / 255.0 blue:205.0 / 255.0 alpha:1.0];
    self.headerLable.textAlignment = NSTextAlignmentCenter;
    self.headerLable.textColor = [UIColor whiteColor];
    self.headerLable.layer.cornerRadius = height / 2;
    self.headerLable.layer.borderWidth = 1.0f;
//    self.headerLable.font = [UIFont boldSystemFontOfSize:17];
    self.headerLable.layer.borderColor = [UIColor colorWithRed:0 / 255.0 green:170.0 / 255.0 blue:205.0 / 255.0 alpha:1.0].CGColor;
}

@end
